import os
import sys
# Calculate the path based on the location of the WSGI script.
apache_configuration = os.path.dirname(__file__)
project = os.path.dirname(apache_configuration)
workspace = os.path.dirname(project)
# Add directories to the PYTHONPATH
sys.path.append(project)
sys.path.append(workspace)
# Setup matplotlib
os.environ['MATPLOTLIBRC'] = "/home/www/cwd/matplotlibrc"
os.environ['MPLCONFIGDIR'] = '/tmp'
# Setup Django
os.environ['DJANGO_SETTINGS_MODULE'] = 'cwd.settings'
sys.path.insert(0, '/usr/local/src/django/Django-1.1.1')
# Hand off control to WSGI
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

